package com.hc.model.code01.test3.after;

public class ComputerDemo {

    public static void main(String[] args) {
        // 创建组件
        HardDisk hardDisk = new XiJieHardDisk();
        Cpu cpu = new IntelCpu();
        Memory memory = new KingstonMemory();

        // 安装组件
        Computer c = new Computer();
        c.setHardDisk(hardDisk);
        c.setCpu(cpu);
        c.setMemory(memory);

        // 启动
        c.run();

    }
}
